package com.hspedu.set_;

import java.util.HashMap;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/2/9
 * @time 19:34
 */
public class HashMapSource02 {
    public static void main(String[] args) {
        HashMap hashMap = new HashMap();
        for (int i = 1; i <= 12; i++) {
            hashMap.put(new B(i),"hello");
        }
    }
}

class B{
    private int i;


    @Override
    public int hashCode() {
        return 100;
    }

    @Override
    public String toString() {
        return "B{" +
                "i=" + i +
                '}';
    }

    public B(int i) {
        this.i = i;
    }
}
